0
Welcome Guest! Login
0 items Join Now

Gantry 4: Call to a member function (get) error...

    • pdowse's Avatar
    • pdowse
    • Hero Rocketeer
    • Posts: 292
    • Thanks: 31

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Check your PHP version - I've found that Gantry 4 doesn't play nice with 7.1 or 7.2.

      7.0 seems to be ok, depending on your setup.

      Hope that helps.
    • Good things come to those who wait - but it's only what's left over from those who don't
    • Jim Dee's Avatar
    • Jim Dee
    • Sr. Rocketeer
    • Posts: 110
    • Thanks: 5
    • PHP, CSS, Gantry :-)

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Well, Gantry 4 works fine. It's running PHP 7.1.25 at the moment. My issue is that the site *only* lets me use Gantry, when I need it to allow me to use other templates. It's perplexing... I definitely don't want to downgrade PHP, though. I'd rather patch / hack Gantry4, if needed (although I'm unsure what the issue is here).
    • ______________________
      Jim Dee
      Principal, Array Web Development * 503-902-HTML
      * SERVICES: Joomla!, RocketTheme/Gantry, PHP, MySQL, CSS/HTML
      * PORTFOLIO: http://www.arraywebdevelopment.com
      * WRITING: https://medium.com/web-design-web-developer-magazine
    • pdowse's Avatar
    • pdowse
    • Hero Rocketeer
    • Posts: 292
    • Thanks: 31

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Try going into Extensions / Manage / Manage and search for Gantry and just make sure everything is running the same version.

      I know with some of my Gantry updates I've had to uninstall older versions floating around and then manually re-install Gantry 4 (downloaded from gantry.org/ )
    • Good things come to those who wait - but it's only what's left over from those who don't
    • Jim Dee's Avatar
    • Jim Dee
    • Sr. Rocketeer
    • Posts: 110
    • Thanks: 5
    • PHP, CSS, Gantry :-)

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • NEW INFO: I've made a dev copy of the site in question and have been testing to solve this. I *think* in fact I've stated the problem wrong! I think the site itself has an issue, and Gantry happens to fix it somehow, which is why ONLY Gantry templates work on the site. The problem, I now think, is that my **Joomla hidden menu items** do not work unless they are on Gantry templates. Any hiden menu item I create and assign Protostar or whatever does *not* work -- throws the Error: Call to a member function get() on null: Call to a member function get() on null. Still researching, but if anyone has thoughts, I'd appreciate them. :-)
    • ______________________
      Jim Dee
      Principal, Array Web Development * 503-902-HTML
      * SERVICES: Joomla!, RocketTheme/Gantry, PHP, MySQL, CSS/HTML
      * PORTFOLIO: http://www.arraywebdevelopment.com
      * WRITING: https://medium.com/web-design-web-developer-magazine
    • pdowse's Avatar
    • pdowse
    • Hero Rocketeer
    • Posts: 292
    • Thanks: 31

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • It's possible that you have an extension that is not compatible with PHP 7 yet.

      Try:

      switching back to PHP 5.6
      upgrading all third party extensions to the latest versions

      See docs.google.com/spreadsheets/d/1HJj02l3B...t?pref=2&pli=1#gid=0 for which extensions are compatible with PHP 7.0.
    • Good things come to those who wait - but it's only what's left over from those who don't
    • Jim Dee's Avatar
    • Jim Dee
    • Sr. Rocketeer
    • Posts: 110
    • Thanks: 5
    • PHP, CSS, Gantry :-)

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Thanks. I did try PHP5.6... That actually helped a bit, as the error reporting was more robust. Instead of the non-identifyable error shown below, it now included info as to the source:

      Notice: Undefined index: in ...public_html/libraries/gantry/gantry.php on line 126
      Notice: Trying to get property of non-object in .../public_html/libraries/gantry/gantry.php on line 207
      Fatal error: Call to a member function get() on null in .../public_html/libraries/gantry/gantry.php on line 267

      There have been other threads (all unsolved,as far as I could tell, related to this. One was:
      rockettheme.com/forum/gantry-for-joomla/...-member-function-get

      Anyway, the weird thing is that this was happening even if no pages were assigned to the Gantry templates I have installed. (The site uses two, and I'd installed a third for testing.) I tried assigning ALL pages to Protostar & was seeing the Gantry errors, above, on hidden-menu items only.

      Then I tried completely disabling all Gantry extensions (and templates) and still got those Gantry errors (which is weird because, if Gantry is totally disabled, why is it being called?).

      FINALLY... I *uninstalled* ALL Gantry extensions and templates... and bam, Protostar started working again.

      The issue isn't solved, unfortunately, because I still can't use Gantry AND a non-Gantry template along with it (at least on this Gantry4 site, on hidden-meun items). I also reinstalled all core Joomla files, just in case something was corrupt. Didn't help. IDK... I think I'm just gonna tell the client that, for this project, we need to get rid of Gantry altogether. It's Gantry4, anyway, so not a giant deal. I'd still love to know what's going on, though. Super frustrating!
    • ______________________
      Jim Dee
      Principal, Array Web Development * 503-902-HTML
      * SERVICES: Joomla!, RocketTheme/Gantry, PHP, MySQL, CSS/HTML
      * PORTFOLIO: http://www.arraywebdevelopment.com
      * WRITING: https://medium.com/web-design-web-developer-magazine
    • Kat05's Avatar
    • Kat05
    • Preeminent Rocketeer
    • Posts: 25898
    • Thanks: 334

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • pdowse wrote:
      Check your PHP version - I've found that Gantry 4 doesn't play nice with 7.1 or 7.2.

      7.0 seems to be ok, depending on your setup.

      Hope that helps.
      Hi there,

      could you be more specific about the issues you have with Gantry 4 on PHP 7.1 and 7.2?
      We're not aware of any issues in our latest versions, apart from a few notices which we're going to address soon.
    • Kat05 / QA Lead & Support / Germany
    • Kat05's Avatar
    • Kat05
    • Preeminent Rocketeer
    • Posts: 25898
    • Thanks: 334

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Hi Jim,

      please feel free to share your link and super admin details with us in the secure tab and let is know on which page the errors can be seen.
    • Kat05 / QA Lead & Support / Germany
    • pdowse's Avatar
    • pdowse
    • Hero Rocketeer
    • Posts: 292
    • Thanks: 31

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Certainly.

      In particular this website.
      crcore.org.au/ gets the following error message on anything above 7.0 (Sorry I can't keep showing the error message as it's a live site)


      Warning: session_start(): Failed to read session data: user (path: /opt/alt/php72/var/lib/php/session) in /home/wcwcdohj/public_html/libraries/joomla/session/handler/native.php on line 260
      Error: Failed to start application: Failed to start the session

      I will have to hunt around for some more, but that's the one I was thinking of (most of our client's we've upgraded to Gantry 5 - not too many 4's floating around)
    • Good things come to those who wait - but it's only what's left over from those who don't
    • Kat05's Avatar
    • Kat05
    • Preeminent Rocketeer
    • Posts: 25898
    • Thanks: 334

    Re: Gantry 4: Call to a member function (get) error...

    Posted 5 years 2 months ago
    • Hi again,

      I googled a bit and any results I found where people came across that same error, it was suggested that it's a misconfiguration of PHP on the server. You should compare between the working PHP 7.0 and the broken PHP 7.2, or just check back with your host about the differences.

      Please see an example discussed here: github.com/joomla/joomla-cms/issues/22046
    • Kat05 / QA Lead & Support / Germany

Time to create page: 0.061 seconds